package com.shop.entity;

import java.io.Serializable;
import java.util.Objects;

//商家表
public class Store implements Serializable {
    private int s_id;              //商家id
    private String s_name;            //商家账号
    private String s_pwd;             //商家密码
    private String s_storename;       //商家店铺名
    private int u_id;              //用户id（外键）

    public Store() {
    }

    public Store(int s_id, String s_name, String s_pwd, String s_storename, int u_id) {
        this.s_id = s_id;
        this.s_name = s_name;
        this.s_pwd = s_pwd;
        this.s_storename = s_storename;
        this.u_id = u_id;
    }

    public int getS_id() {
        return s_id;
    }

    public void setS_id(int s_id) {
        this.s_id = s_id;
    }

    public String getS_name() {
        return s_name;
    }

    public void setS_name(String s_name) {
        this.s_name = s_name;
    }

    public String getS_pwd() {
        return s_pwd;
    }

    public void setS_pwd(String s_pwd) {
        this.s_pwd = s_pwd;
    }

    public String getS_storename() {
        return s_storename;
    }

    public void setS_storename(String s_storename) {
        this.s_storename = s_storename;
    }

    public int getU_id() {
        return u_id;
    }

    public void setU_id(int u_id) {
        this.u_id = u_id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Store store = (Store) o;
        return s_id == store.s_id &&
                u_id == store.u_id &&
                Objects.equals(s_name, store.s_name) &&
                Objects.equals(s_pwd, store.s_pwd) &&
                Objects.equals(s_storename, store.s_storename);
    }

    @Override
    public int hashCode() {
        return Objects.hash(s_id, s_name, s_pwd, s_storename, u_id);
    }

    @Override
    public String toString() {
        return "Store{" +
                "s_id=" + s_id +
                ", s_name='" + s_name + '\'' +
                ", s_pwd='" + s_pwd + '\'' +
                ", s_storename='" + s_storename + '\'' +
                ", u_id=" + u_id +
                '}';
    }
}
